home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_iitool.asp < prev    next >
Encoding:
Text File  |  1999-06-03  |  3.8 KB  |  176 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4.  
  5. <!--#include file="iitool.str"-->
  6. <!--#include file="iisetfnt.inc"-->
  7. <!--#include file="iigtdata.str"-->
  8.  
  9. <% 
  10. On Error Resume Next 
  11. %>
  12.  
  13. <HTML>
  14.  
  15. <HEAD>
  16.  
  17. <SCRIPT LANGUAGE="javascript">
  18.  
  19.     function chkDataPaths(){
  20.         if (top.title.Global.siteProperties){
  21.             top.connect.location.href="iisess.asp?clearPathsOneTime=False";        
  22.             save();
  23.         }
  24.         else{
  25.             top.title.Global.updated=false;
  26.             if (!top.title.Global.dontAsk){
  27.                 width = <%= L_IIGTDATA_W %>;
  28.                 height = <%= L_IIGTDATA_H %>;
  29.                 popbox=window.open("iigtdata.asp","GetDataPaths","toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  30.                 if(popbox !=null){
  31.                     if (popbox.opener==null){
  32.                         popbox.opener=self;
  33.                     }
  34.                 }
  35.             }
  36.             else{
  37.                 save();
  38.             }
  39.         }
  40.     }
  41.     
  42.     
  43.     var uform;
  44.     function save()
  45.     {
  46.         var bDoSave = true;
  47.         parent.iisstatus.location.href = "iistat.asp?status=" + escape("<%= L_SAVING_TEXT %>");
  48.         if (parent.main.head != null){
  49.             uform=parent.main.head.document.userform;
  50.             parent.main.head.listFunc.writeList();
  51.         }
  52.         else{
  53.             uform=parent.main.document.userform;
  54.             if( parent.main.validatePage != null )
  55.             {
  56.                 bDoSave = parent.main.ContinueSave();
  57.             }
  58.         }
  59.         
  60.         if( bDoSave )
  61.         {
  62.             dosave();
  63.         }
  64.         else
  65.         {
  66.             parent.main.SaveCallback();
  67.         }
  68.     }
  69.     
  70.     function dosave()
  71.     {
  72.         path="?state=saving";
  73.         for (i=0; i < uform.elements.length;i++){
  74.  
  75.             thiselement=uform.elements[i];
  76.             thisname=uform.elements[i].name;
  77.             thisval=uform.elements[i].value;
  78.  
  79.             if (thisname !=""){
  80.                 if (thisname.substring(0,3) !="chk"){                                            
  81.                     if (thisname.substring(0,3) !="txt"){
  82.                         if (thisname.substring(0,3) !="btn"){                    
  83.                             if (thisname.substring(0,3) !="rdo"){                        
  84.                                 if (thisname.indexOf("hdn") != ""){
  85.                                         path=path + "&" + escape(thisname);
  86.                                         path=path + "=" + escape(thisval);
  87.                                 }
  88.                             }
  89.                         }
  90.                     }
  91.                     else{
  92.                         path=path + "&" + thisname.substring(3, thisname.length);
  93.                         path=path + "=" + escape(thisval);
  94.                     }
  95.                 }
  96.                 else{
  97.                     path=path + "&" + thisname.substring(3, thisname.length);
  98.                     if (thiselement.checked){
  99.                         path=path + "="+true;
  100.                     }
  101.                     else{
  102.                         path=path + "="+false;                
  103.                     }            
  104.                 }
  105.             }
  106.             else{
  107.                 path=path + "&GreetingMessage=" + escape(thisval);
  108.             }
  109.         }
  110.             //write off non-list values & checks for child inheritence...
  111.             top.connect.location.href=("iiput.asp"+path);
  112.     }
  113.  
  114.     function reset() {
  115.         top.title.Global.updated=false;
  116.         parent.main.location.href=parent.main.location.href;
  117.     }
  118.  
  119.     function toolFunc(){
  120.         this.save=save;
  121.         this.dosave = dosave;
  122.     }
  123.  
  124.     function sleep(cnt){
  125.         for (i=0;i<cnt;i++){
  126.         }
  127.     }
  128.  
  129.     toolFuncs=new toolFunc();
  130.  
  131.         
  132. </SCRIPT>
  133.  
  134. </HEAD>
  135.  
  136. <BODY BACKGROUND="images/greycube.gif" TEXT="#FFFFFF" LINK="#FFFFFF" ALINK="#FFFFFF" VLINK="#FFFFFF">
  137.  
  138. <TABLE HEIGHT=30 ALIGN="right" CELLPADDING=1 CELLSPACING=1>
  139.  
  140.     <TR>
  141.  
  142.     <TD><TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0>
  143.  
  144.         <TR>
  145.             <TD VALIGN="middle">
  146.                 <%= sFont(2,Session("MENUFONT"),"",True) %>
  147.                 <B>
  148.                 <A HREF="javascript:chkDataPaths();"><IMG HEIGHT=16 WIDTH=16 HSPACE=2 ALIGN="top" SRC="images/save.gif" BORDER=0 ALT="<%= L_SAVE_TEXT %>"><%= L_SAVE_TEXT %></A>
  149.                 </B>
  150.                 </FONT>
  151.             </TD>
  152.         </TR>
  153.  
  154.     </TABLE></TD>
  155.     
  156.     <TD><%= sFont(2,Session("MENUFONT"),"",True) %>|</FONT></TD>
  157.  
  158.     <TD><TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0>
  159.  
  160.         <TR>
  161.             <TD VALIGN="middle">
  162.                 <%= sFont(2,Session("MENUFONT"),"",True) %><B>
  163.                 <A HREF="javascript:reset();"><IMG HEIGHT=16 WIDTH=16 HSPACE=2 ALIGN="top" SRC="images/refr.gif" BORDER=0 ALT="<%= L_RESET_TEXT %>"><%= L_RESET_TEXT %></A>
  164.                 </B></FONT>
  165.             </TD>
  166.         </TR>
  167.  
  168.     </TABLE></TD>
  169.     
  170.     <TD></TD>
  171.     </TR>
  172.  
  173. </TABLE>
  174.  
  175. </BODY>
  176. </HTML>